<?php
      class My_Menu_Plugin_Navi extends Zend_Controller_Plugin_Abstract {
        public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request)
      {
          if(!$request->isXmlHttpRequest()) {
              $front = Zend_Controller_Front::getInstance();
              if (!$front->hasPlugin('Zend_Controller_Plugin_ActionStack')) {
                  $actionStack = new Zend_Controller_Plugin_ActionStack();
                  $front->registerPlugin($actionStack, 97);
             } else {
                 $actionStack = $front->getPlugin('Zend_Controller_Plugin_ActionStack');
             }
 
             $naviAction = clone($request);
             $naviAction->setActionName('navi')
                     ->setControllerName('index');
             $actionStack->pushStack($naviAction);
 
             $subnaviAction = clone($request);
             $subnaviAction->setActionName('subnavi')
                     ->setControllerName('index');
             $actionStack->pushStack($subnaviAction);
             
             $subnavi2Action = clone($request);
             $subnavi2Action->setActionName('subnavi2')
                     ->setControllerName('index');
             $actionStack->pushStack($subnavi2Action);
             
             $naglowekAction = clone($request);
             $naglowekAction->setActionName('naglowek')
                     ->setControllerName('index');
             $actionStack->pushStack($naglowekAction);
             
             $naglowekzalogAction = clone($request);
             $naglowekzalogAction->setActionName('naglowekzalog')
                     ->setControllerName('index');
             $actionStack->pushStack($naglowekzalogAction);
             
         }
     }
     /*
      public function preDispatch($request) {
           $this->getResponse()->appendBody('<p>preDispatch()</p>');
     }
 
     public function routeShutdown($request){
         $this->getResponse()->appendBody('<p>routeShutdown()</p>');
     }
     public function dispatchLoopStartup($request){
         $this->getResponse()->appendBody('<p>dispatchLoopStartup()</p>');
     }
 
     public function postDispatch($request){
         $this->getResponse()->appendBody('<p>postDispatch()</p>');
     }
 
     public function dispatchLoopShutdown(){
         $this->getResponse()->appendBody('<p>dispatchLoopShutdown()/p>');
     }
 */
    }
 
